package com.xyw.code.study20200812.study2;

import java.util.concurrent.ExecutionException;

/**
 * Created with IntelliJ IDEA.
 * User: xuyiwei
 * Date: 2020/8/13
 * Time: 上午8:33
 * Email: 1328312923@qq.com
 * Description: No Description
 **/
public class Test2Callback {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        Store wallMart = new Store("沙中路沃尔玛");
        NoSyncBuyer syncBuyer = new NoSyncBuyer(wallMart, "小明", "超能铁扇公主");
        System.out.println(syncBuyer.orderGoods());


        System.out.println("\n");
        Store lawson = new Store("f沙中路罗森便利店");
        NoSyncBuyer noSyncBuyer = new NoSyncBuyer(lawson, "cherry", "变形金刚");
        System.out.println(noSyncBuyer.orderGoods());
    }
}
